logical c programs